<!-- <template>
  <div>
    <el-table :data="list" style="width: 100%" height="650">
      <el-table-column prop="id" label="id" />
      <el-table-column prop="name" label="名称" />
      <el-table-column prop="price" label="价格" />
      <el-table-column prop="size" label="房屋大小" />
      <el-table-column prop="sizeRoom" label="房间" />
      <el-table-column prop="level" label="装修" />
    </el-table>
  </div>
</template>

<script setup>
// import axios from 'axios';
import { ref } from 'vue';
import request from './utils/request';

const list = ref([])

const getData = () => {
  // axios.get('/api/room/list').then(res => {
  //   console.log(res);
  // if (res.status === 200 && res.data.code === 10000) {
  //   list.value = res.data.data.list
  // }

  // })

  request.get('/room/list').then(res => {
    console.log(res);
    if (res.status === 200 && res.data.code === 10000) {
      list.value = res.data.data.list
    }
  })
}

getData()

</script> -->

<template>
  <div>
    <router-view></router-view>
  </div>
</template>